import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Solution1276 {
    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {
        if (tomatoSlices-2*cheeseSlices<0 || (tomatoSlices-2*cheeseSlices)%2==1 || (tomatoSlices-2*cheeseSlices)/2>cheeseSlices){
            return new ArrayList<>();
        }
        return Arrays.asList((tomatoSlices-2*cheeseSlices)/2,cheeseSlices-(tomatoSlices-2*cheeseSlices)/2);
    }

    public static void main(String[] args) {
        System.out.println(new Solution1276().numOfBurgers(16,7));
    }
}
